<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理员列表</title>
<style type="text/css">
<!--
body {
	margin:0px;
}
.STYLE2 {
	color: #73938E;
	font-weight: bold;
}
.list_content {
	background-color: #fff;
	color:#73938E;
	font-size:12px;
	line-height:15px;
	text-align:center;
}
-->
</style>
</head>
<script language="javascript">
function notEmpty(){
	if(addForm.userName.value==""){
	alert('您没有输入用户名！');
	addForm.userName.select();
	return false;
	}
	if(addForm.userPwd.value==""){
	alert('您没有输入密码！');
	addForm.userPwd.select();
	return false;
	}
	if(addForm.reuserPwd.value==""){
	alert('您没有输入重复密码！');
	addForm.reuserPwd.select();
	return false;
	}
	if(addForm.userPwd.value!=addForm.reuserPwd.value){
	alert('两次密码输入不一致！');
	addForm.reuserPwd.select();
	return false;
	}
	return true;
}
function delcfm(){
    if(!confirm("确认要删除该管理员吗？")){
        window.event.returnValue = false;
    }
}
</script>
<body>
<?php
 session_start();
 include("../main/function.php");
 include("../main/ShowPage.class.php");
 include("../main/islogin.php");
 $db=new Db();
 $adminInfo=$db->fetchRows("SELECT * FROM admin order by id DESC");
 $adminNo=$db->rowNum("SELECT * FROM admin");
?>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
  <TR height=28 >
    <TD background=../images/title_bg1.jpg>-->当前位置: 管理员列表</TD>
</TR>
<tr>
<td>&nbsp;</td>
</tr>
<TR>

<td width="837"> <div align="center">
  <?php  echo "共有".$adminNo."名管理员："."<br>"; ?>
</div></td>
</tr>
</table>

<table width="30%" border="1" align="center"  cellpadding="3" cellspacing="0" bordercolor="#F3F8F7"  >
  <tr align="center"  class="table_style">
    <td bgcolor="#F3F8F7" ><span class="STYLE2">管理员</span></td>
	<td bgcolor="#F3F8F7" ><span class="STYLE2">操作</span></td>
  </tr>
 <?PHP while($adminNo) { ?>
  <tr align="center">
    <td  width="211"><?php echo $adminInfo[$adminNo-1][username]?></td>
    <td  width="151" class="list_content"><a href="DeleteAdmin.php?adminId=<?php echo $adminInfo[$adminNo-1][Id] ?>" onclick="delcfm()">删除</a></td>
  </tr>
  <?php $adminNo=$adminNo-1;} ?>
</table>
</div>
</body>
</html>
